import request from "@/utils/request";

const api = '/pay-domain/'

/**
 * 线上支付渠道
 * **/
// 查询
export async function onlineChannelList(params) {
    return await request.get(api + 'onlineChannel/list', {params})
}

// 启/禁用
export async function onlineUpdateStatus(params) {
    return await request.post(api + 'onlineChannel/updateStatus', params)
}

/**
 * 线下支付渠道
 * **/
// 新增绑定产品
export async function offlinePayBindProduct(params) {
    return await request.post(api + 'offlinePay/binding', params)
}

// 查询系统用户绑定的产品
export async function bindingProductSearch(params) {
    return await request.get(api + 'offlinePay/bindingProductSearch', {params})
}

// 删除
export async function bindingProductDelete(params) {
    return await request.post(api + 'offlinePay/delete', params)
}

// 编辑
export async function bindingProductEdit(params) {
    return await request.post(api + 'offlinePay/edit', params)
}

// 新增
export async function bindingProductInsert(params) {
    return await request.post(api + 'offlinePay/insert', params)
}

// 打款银行
export async function fetchPayBank(params) {
    return await request.get(api + 'offlinePay/payBank', {params})
}

// 还款银行
export async function fetchRepaymentBank(params) {
    return await request.get(api + 'offlinePay/refundBank', {params})
}

// 回款银行
export async function fetchRefundBank(params) {
    return await request.get(api + 'offlinePay/refundBank', {params})
}

// 搜索
export async function fetchList(params) {
    return await request.get(api + 'offlinePay/search', {params})
}

// 查询未绑定的产品
export async function unboundProduct(params) {
    return await request.get(api + 'offlinePay/unboundProduct', {params})
}

// 修改
export async function offlinePayUpdate(params) {
    return await request.post(api + 'offlinePay/update', params)
}

// 开/关状态
export async function offlinePayUpdateStatus(params) {
    return await request.post(api + 'offlinePay/updateStatus', params)
}
// 生成虚拟线下还款卡
export async function createOfflineCard(params) {
    return await request.post(api + 'offlinePay/insertFunPay', params)
}
// 获取下次轮换时间
export async function fetchDateTime(params) {
    return await request.get(api + 'offlinePay/nextTime', {params})
}
/**
 *  虚拟卡列表
 * **/

// 获取虚拟卡列表
export async function fetchVirtualList(params) {
    return await request.post(api + 'pay/virtualList', params)
}

// 虚拟卡列表导出
export async function virtualListExport(params) {
    return await request.post(api + 'pay/virtualListExport', params)
}

// 虚拟卡生成记录
export async function virtualListRecord(params) {
    return await request.post(api + 'pay/vaRecordList', params)
}

/**
 *  非业务打款
 */
// 工资代发列表
export async function payWagesList(params) {
    return await request.post(api + 'payWages/payWagesList', params)
}

// 发起工资代发
export async function payWagesConfirm(params) {
    return await request.post(api + 'payWages/sendPayWages', params)
}
// 工资代发列表导出
export async function payWagesExport(params) {
    return await request.post(api + 'payWages/payWagesExport', params)
}
